#!/usr/bin/perl
# file : perl_ftp.pl
use Net::FTP;
#use strict;
use constant HOST => '10.17.19.254';
use constant DIR => '/pub/CPAN';
use constant FILE => 'RECENT';

my $ftp = Net::FTP->new(HOST) or die "Couldn't conncet:$@\n";
$ftp->login('haision','haision')     or die $ftp->message;
$ftp->cwd(DIR)               or die $ftp->message;
$ftp->get(FILE)              or die $ftp->message;
$ftp->quit;
warn "File retrieved successfully.\n";
